home *** CD-ROM | disk | FTP | other *** search
- on efectocaja
- global Tabcajas, num_caja, objeto, caja_cal_1, caja_cal_2, caja_cal_3, caja_escudo, caja_vida, cal_1, cal_2, cal_3, vida, escudo, idioma, pase, max_cal_1, max_cal_2, max_cal_3, max_vida, max_escudo
- set objeto to getAt(Tabcajas, num_caja)
- if objeto = 0 then
- puppetSound("CAJA VACIA")
- else
- puppetSound("CAJA LLENA")
- updateStage()
- puppetSprite(18, 1)
- puppetSprite(19, 1)
- set PosCast to the number of cast "NIV_00.PIC"
- if objeto = 1 then
- set cal_1 to cal_1 + caja_cal_1
- if cal_1 > max_cal_1 then
- set cal_1 to max_cal_1
- end if
- set the castNum of sprite 30 to PosCast + integer((12 * float(cal_1) / float(max_cal_1)) + 0.40000000000000002)
- set nom_objeto to "1-" & string(idioma)
- set imag_objeto to "MUNICION 1"
- set sonido to "M" & string(idioma) & "-11"
- else
- if objeto = 2 then
- set cal_2 to cal_2 + caja_cal_2
- if cal_2 > max_cal_2 then
- set cal_2 to max_cal_2
- end if
- set the castNum of sprite 31 to PosCast + integer((12 * float(cal_2) / float(max_cal_2)) + 0.40000000000000002)
- set nom_objeto to "2-" & string(idioma)
- set imag_objeto to "MUNICION 2"
- set sonido to "M" & string(idioma) & "-12"
- else
- if objeto = 3 then
- set cal_3 to cal_3 + caja_cal_3
- if cal_3 > max_cal_3 then
- set cal_3 to max_cal_3
- end if
- set the castNum of sprite 32 to PosCast + integer((12 * float(cal_3) / float(max_cal_3)) + 0.40000000000000002)
- set nom_objeto to "3-" & string(idioma)
- set imag_objeto to "MUNICION 3"
- set sonido to "M" & string(idioma) & "-13"
- else
- if objeto = 4 then
- set vida to vida + caja_vida
- if vida > max_vida then
- set vida to max_vida
- end if
- set the castNum of sprite 28 to PosCast + integer((12 * float(vida) / float(max_vida)) + 0.40000000000000002)
- set nom_objeto to "4-" & string(idioma)
- set imag_objeto to "VIDA"
- set sonido to "M" & string(idioma) & "-20"
- else
- if objeto = 5 then
- set escudo to escudo + caja_escudo
- if escudo > max_escudo then
- set escudo to max_escudo
- end if
- set the castNum of sprite 29 to PosCast + integer((12 * float(escudo) / float(max_escudo)) + 0.40000000000000002)
- set nom_objeto to "5-" & string(idioma)
- set imag_objeto to "ESCUDO"
- set sonido to "M" & string(idioma) & "-21"
- else
- if objeto = 6 then
- set nom_objeto to "6-" & string(idioma)
- set imag_objeto to "LENCERIA"
- set sonido to "M" & string(idioma) & "-18"
- else
- if objeto = 7 then
- set nom_objeto to "7-" & string(idioma)
- set imag_objeto to "CD"
- set sonido to "M" & string(idioma) & "-19"
- else
- if objeto = 8 then
- set nom_objeto to "8-" & string(idioma)
- set imag_objeto to "CONSOLADOR"
- set sonido to "M" & string(idioma) & "-17"
- else
- if objeto = 9 then
- set nom_objeto to "9-" & string(idioma)
- set imag_objeto to "BOLAS"
- set sonido to "M" & string(idioma) & "-16"
- else
- if objeto = 10 then
- set nom_objeto to "10-" & string(idioma)
- set imag_objeto to "VIDEO CARD"
- set the visible of sprite 34 to 1
- set sonido to "M" & string(idioma) & "-14"
- else
- if objeto = 11 then
- set nom_objeto to "11-" & string(idioma)
- set imag_objeto to "LLAVE"
- set the visible of sprite 33 to 1
- set pase to 1
- set sonido to "M" & string(idioma) & "-15"
- updateStage()
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- end if
- setAt(Tabcajas, num_caja, 0)
- set the castNum of sprite 18 to the number of cast imag_objeto
- puppetTransition(26, 0, 16)
- updateStage()
- set the castNum of sprite 19 to the number of cast nom_objeto
- puppetTransition(1, 4, 2)
- puppetSound(sonido)
- updateStage()
- repeat while soundBusy(1)
- end repeat
- puppetSound(0)
- startTimer()
- end if
- end
-